<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('转移申请信息')"/>
    <th:block th:include="include :: ztree-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-move-add">
        <input type="hidden" th:field="${move.mid}" name="mid">
        <div class="col-md-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">申请转移的任务：</label>
                <div class="col-sm-9">
                    <input type="hidden" name="tid" class="form-control" th:value="${move.tid}"/>
                    <input type="text" name="" class="form-control" th:value="${move.info.target}" disabled="disabled"/>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">申请人：</label>
            <div class="col-sm-9">
                <div class="col-sm-9">
                    <input type="text" name="ddate" class="form-control" th:value="${move.aUser.userName}" disabled="disabled"/>
                </div>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">移交人：</label>
            <div class="col-sm-9">
                <select class="form-control" name="ologname" >
                    <option>--请选择--</option>
                    <option th:each="u:${users}" th:text="${u.userName}" th:value="${u.loginName}"></option>
                </select>
            </div>
        </div>
        <div class="form-group">
            <label class="col-sm-3 control-label">转移原因：</label>
            <div class="col-sm-9">
                <textarea type="text" name="reason" class="form-control" placeholder="请输入文本"
                          th:field="${move.reason}"></textarea>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: ztree-js"/>
<script type="text/javascript">
    function submitHandler() {
        if ($.validate.form()) {
            add();
        }
    }

    function add() {
        var vals = $("#form-move-add").serialize();
        $.ajax({
            cache: true,
            type: "POST",
            url: ctx + "cms/mm/move/editMove",
            data: vals,
            async: false,
            error: function (request) {
                $.modal.alertError("系统错误");
            },
            success: function (data) {
                $.operate.successCallback(data);
            }
        });
    }
</script>
</body>
</html>
